update format specific handling. (#502)
* update format specific handling.
Format specific allocate, copy, destroy functions use new/delete for
underlying data management. Use brace intitializers for underlying
data. Previous xmalloc/xcalloc and xfree were used.
Format specific copy functions use copy constructor of underlying data.
Format specific copy functions have a const source.
Format specific functions use static_cast instead of c-style casts.
This helps avoid casting away const accidentally.
When possible, assign the result of fs_chain_find to a const pointer.
Eliminate corruption of global lists by AN1 writer which was modifying
format specific data. This also simplifies memomry management and
fixes a double delete.
Fix const correctness issues with an1 symbol lookup.
Correct an1 symbol lookup to avoid dependency on structure padding.
Catch make-an1sym.pl with an1sym.h.
* use reinterpret_cast w/ fs_chain_add fs_chain_find ...
instead of c-style casts.
* make format_specifc_data a base class
and the various flavors derived classes.
* use a QList for format_specific_data chains.
* split format specific defines ...
use reinterpret_cast to downcast format_specific_data. dynamic_cast
is noticeably slower.
* add new formspec.h file.
* create FormatSpecificDataList class.
rename format specific related items.
* safety check for formspec nullptr function ptrs.
* replace format specific function pointers
with pure virtual clone function and dtor.
32 files changed: